<head>
  <script language="javascript" type="text/javascript" src="//cdn.jsdelivr.net/p5.js/0.3.6/p5.min.js"></script>
  <script language="javascript" type="text/javascript" src="//cdn.jsdelivr.net/p5.js/0.3.6/addons/p5.dom.js"></script>
  <script language="javascript" type="text/javascript" src="classifier.js"></script>
  <script language="javascript" type="text/javascript" src="sketch.js"></script>
  <style>
    .results {
      padding: 5px;
    }
  </style>
</head>

<body>

  <h1>Naive Bayes Classifier</h1>

  <p>This page demonstrates naive bayes text classification.  To process very large data sets, this should really be a server-side application.  But this demonstrates the basic idea.  This is based on Paul Graham's <a href="http://www.paulgraham.com/spam.html">plan for spam</a>.  Instead of spam, however, this simply tries to categorize a text as either A or B.  First select training files and then you can select a file for the classifier to guess.  <a href="https://github.com/shiffman/Programming-from-A-to-Z-F14/">File issues and view source on github.</a></p>

</body>